from django.contrib import admin

# Register your models here.
from .models import HotelWhitePrice, HotelItemPrice, HotelXcId, HotelItemXx, HotelIdBind


class HotelWhitePriceAdmin(admin.ModelAdmin):
    # ...
    list_display = ('shid', 'srtid', 'zhengce', 'itemid', 'price', 'create_time', 'update_time')
    search_fields = ['shid', 'itemid']


class HotelItemPriceAdmin(admin.ModelAdmin):
    # ...
    list_display = ('shid', 'srtid', 'item_id', 'rate_id', 'sellernick', 'create_time', 'update_time')
    search_fields = ['shid', 'sellernick', 'item_id', 'srtid']


class HotelXcIdAdmin(admin.ModelAdmin):
    # ...
    list_display = ('name', 'hotel_id')
    search_fields = ['name', 'hotel_id']


class HotelItemXxAdmin(admin.ModelAdmin):
    # ...
    list_display = ('shid', 'srtid', 'item_id', 'rate_id', 'sellernick', 'create_time', 'update_time')
    search_fields = ['shid', 'sellernick', 'item_id', 'srtid']


class HotelIdBindAdmin(admin.ModelAdmin):
    # ...
    list_display = ('xc_hotel_id', 'xc_hotel_name', 'fz_hotel_id', 'fz_hotle_name')
    search_fields = ['xc_hotel_id', 'xc_hotel_name', 'fz_hotel_id', 'fz_hotle_name']


admin.site.register(HotelWhitePrice, HotelWhitePriceAdmin)
admin.site.register(HotelItemPrice, HotelItemPriceAdmin)
admin.site.register(HotelXcId, HotelXcIdAdmin)
admin.site.register(HotelItemXx, HotelItemXxAdmin)
admin.site.register(HotelIdBind,HotelIdBindAdmin)
admin.site.site_header = "爬虫数据管理平台"
